#include <iostream>
#include <signal.h>
#include <sys/types.h>
#include <unistd.h>
using namespace std;
void sighandle(int sig)
{
    cout << "收到信号：" << sig << endl;
}
int main()
{
    for (int i = 1; i <= 31; i++)
        signal(i, sighandle);
    cout << getpid() << endl;
    while (1)
    {
        sleep(1);
    }
    return 0;
}